<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
		<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
		<link rel="stylesheet" href="/css/font.css">
		<link rel="stylesheet" href="/css/xadmin.css">
	</head>

	<body>
		<div class="x-body" id="app">
			<table class="layui-table layui-form">
				<thead>
					<tr>
						<th width="100">课程代码</th>
						<th width="100">课程名称</th>
						<th width="100">考试日期</th>
						<th width="100">考试时间</th>
						<th width="100">考试教室</th>
						<th width="60">座位号</th>
				</thead>
				<tbody>
					<tr v-for="examStudent in examStudents">
						<td>{{ examStudent.course_no }}</td>
						<td>{{ examStudent.course_name }}</td>
						<td>{{ examStudent.exam_date }}</td>
						<td>{{ examStudent.exam_time }}</td>
						<td>{{ examStudent.room_name }}</td>
						<td>{{ examStudent.seat_number }}</td>
					</tr>
				</tbody>
			</table>
		</div>
       <script type="text/javascript" src="/js/jquery.min.js"></script>
        <script type="text/javascript" src="/js/vue.min.js"></script>
        <script type="text/javascript" src="/js/xadmin.js"></script>
        <script type="text/javascript" src="/lib/layui/layui.js" charset="utf-8"></script>
        <script>
            var vm = new Vue({
                el : '#app',
                data : {
                	examStudents : ""
                },
                created : function() {
                   this.listExamStudent();
                },
                methods : {
                	listExamStudent : function() {
                        var vm = this;
                        $.ajax({
                            url : "/student/exam/listResitExamStudent",
                            type : "get",
                            success : function(result) {
                                if (result.state) {
                                    vm.examStudents = result.data;
                                } else {
                                    layui.use(['layer'], function(){
                                        var layer = layui.layer
                                        layer.msg(""+result.msg, {icon: 5});
                                    });
                                }
                            }
                        });
                    }
                }
            });
        </script>
	</body>

</html>
